﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="website_admin_sales_ordermaglist" Codebehind="ordermaglist.aspx.cs" %>

<%@ Register Src="../../admin/_root/_controls/ctlNavBar.ascx" TagName="ctlNavBar"
    TagPrefix="uc1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>

    <script src="../_common/scripts/jquery-1.4.1.min.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>

    <script language="javascript" src="../../_common/datepicker/wdatepicker.js" type="text/javascript"></script>

    <link href="../_common/styles/frame_global.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        function window.onload() {
            LoadingData(); 
        }
        function Search()
        {
            pageIndex = "1";
            LoadingData();
        }
        var pageIndex = "";
        function pagination(index)
        {
            pageIndex = index;
            LoadingData();
        }
        function LoadingData() {
            $.ajax({
                async: true,
                type: "POST",
                url: "ordermaglist.aspx",
                data: {
                    index: pageIndex,
                    otype: "loadingdata",
                    username: $("#txtUsername").val(),
                    ordernumber: $("#txtOrderNumber").val(),
                    date_from:  $("#txtOrderDate_From").val(),
                    date_to:  $("#txtOrderDate_To").val(),
                    orderstatus: $("#selStatus").val()
                },
                beforeSend: function() {
                    $("#divLoading").css("display", "block");
                    $("#divItemsList").html("");
                },
                success: function(data, textStatus) {
                    $("#divLoading").css("display", "none");
                    $("#divItemsList").html(data);
                }
            });
        }
        function Delete(_objectId) { 
            if(confirm("你确定要执行删除操作?"))
            {
               $.ajax({
                    async: false,
                    type: "POST",
                    url: "membersmaglist.aspx",
                    data: {
                        otype: "delete",
                        objectId: _objectId
                    },
                    success: function(data, textStatus) { 
                        if (data == "succeeded") {
                            alert("删除操作完成！");
                            LoadingData();
                        }
                        else {
                            alert(data);
                        }
                    }
                });
            }
        }
        function Modify(objectId)
        {
            window.location.href="memberinfoeditor.aspx?otype=modify&groupid="+getUrlParam("groupid")+"&userid="+objectId;
        } 
        function View(objectId)
        {
            window.location.href="memberinfoeditor.aspx?otype=modify&groupid="+getUrlParam("groupid")+"&userid="+objectId;
        } 
    </script>

</head>
<body>
    <form id="aspnetForm" runat="server">
    <div class="divAreas">
        <div class="boxTopBar">
            <div class="boxTopBarLeft">
                <div class="navBar">
                    <uc1:ctlNavBar ID="ctlNavBar1" runat="server" />
                </div>
            </div>
            <div class="boxTopBarRight">
            </div>
        </div>
        <div class="boxMain">
            <div class="boxMainBody">
                <table cellpadding="0" cellspacing="0" class="stdTable" style="width: 98%;">
                    <tbody>
                        <tr style="height: 32px;">
                            <td style="padding: 0px 5px 0px;">
                                <table class="stdTable" cellpadding="0" cellspacing="0">
                                    <colgroup>
                                        <col style="text-align: right; width: 65px;" />
                                        <col style="width: 120px;" />
                                        <col style="text-align: right; width: 65px;" />
                                        <col style="width: 120px;" />
                                        <col style="padding-right: 5px; text-align: right; width: 70px;" />
                                        <col style="width: 160px;" />
                                        <col style="padding-right: 5px; text-align: right; width: 70px;" />
                                        <col style="width: 100px;" />
                                        <col style="text-align: right;" />
                                    </colgroup>
                                    <tr>
                                        <td>
                                            用户信息：
                                        </td>
                                        <td>
                                            <input type="text" id="txtUsername" name="txtUsername" class="textBox" />
                                        </td>
                                        <td>
                                            订单编号：
                                        </td>
                                        <td>
                                            <input type="text" id="txtOrderNumber" name="txtOrderNumber" class="textBox" />
                                        </td>
                                        <td>
                                            日期：
                                        </td>
                                        <td>
                                            <input type="text" class="tbxReadOnly" style="width: 65px;" id="txtOrderDate_From"
                                                name="txtOrderDate_From" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" />
                                            ～
                                            <input type="text" class="tbxReadOnly" style="width: 65px;" id="txtOrderDate_To"
                                                name="txtOrderDate_To" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" />
                                        </td>
                                        <td>
                                            订单状态：
                                        </td>
                                        <td>
                                            <select id="selStatus" name="selStatus" class="SelectBox">
                                                <option value="">-- 全部 --</option>
                                                <option value="0">未支付</option>
                                                <option value="1">已支付</option>
                                                <option value="-1">已作废</option>
                                            </select>
                                        </td>
                                        <td>
                                            <input id="Button1" class="btn_s" value="查 询" type="button" onclick="Search();" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr style="height: 100%;">
                            <td valign="top" style="padding: 5px 5px 0px;">
                                <table cellpadding="0" cellspacing="0" class="Form-Gruid" align="center" style="height: 100%;">
                                    <tbody>
                                        <tr>
                                            <td style="background: #ffffff; vertical-align: top;">
                                                <div id="divLoading" style="display: none;">
                                                    <table style="background-color: #FFFFFF; border: solid 1px #eoeoeo; table-layout: fixed;
                                                        width: 100%; height: 100%;" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="vertical-align: middle" align="center">
                                                                <img src="../_imgs/admin/progress.gif" /><br />
                                                                加载数据 ...
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div id="divItemsList">
                                                </div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="boxBottomBar">
            <div class="boxBottomBarLeft">
                &nbsp;
            </div>
            <div class="boxBottomBarRight">
                &nbsp;
            </div>
        </div>
    </div>
    </form>
</body>
</html>
